feat: add support for input overrides for attachments#1383
Open
feat: add support for input overrides for attachments#1383
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request adds support for input overrides for attachments in evaluation sets, building on previous autonomous mode changes. The feature allows file IDs, names, and MIME types to be overridden before conversational inputs are converted to message format, enabling flexible attachment handling during evaluations.
Changes:
- Added
_apply_file_overrides_to_conversational_inputsfunction to match and update attachment fields based on FullName - Integrated input_overrides parameter through the eval command flow to support file overrides
- Implemented attachment content part creation with URN-based file references for user messages
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/uipath/eval/helpers.py | Added helper function to apply file overrides to conversational inputs before message conversion, integrated into eval set loading |
| src/uipath/_cli/cli_eval.py | Passed input_overrides parameter to load_eval_set calls for override support |
| src/uipath/_cli/_evals/_conversational_utils.py | Implemented attachment-to-content-part conversion with UiPathExternalValue for user messages |
| tests/cli/eval/test_conversational_utils.py | Added comprehensive tests for attachment conversion including single/multiple attachments, empty text cases, and unique ID generation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed?
A few sentences describing the changes made in this pull request.
Piggybacking off of changes made for autonomous: https://github.com/UiPath/Agents/pull/4112
How has this been tested?
Autonomous working still:

and in UI:

Conversational:

In UI:
Working in UV run (this PR: #1383)

Ex1:
Ex2:

Eval set file from SW:
using the following args that I log from Agents BE (this PR: https://github.com/UiPath/Agents/pull/4517) since it doesnt yet send a job to orchestrator
uv run uipath eval agent.json evals/eval-sets/evaluation-set-1772127016991.json --eval-ids '["453d4313-5cab-4f0d-b447-d26cffe72717"]' --eval-set-run-id 9f503071-e9dd-41c8-8c2a-5871cb23c4f6 --model-settings-id default --input-overrides '{"a3058351-8e3e-42dd-b298-26c87d8a5681":{"files":[{"ID":"24d24699-c158-47dc-3563-08de754e2ecf","FullName":"Eva by Haim Sutin.jpg","MimeType":"image/jpeg"}]},"21bf7c6a-3c8e-42e2-b399-ad3f3e50fce1":{"files":[{"ID":"e312c0a1-41be-4cb7-c90d-08de754d5847","FullName":"Updated_protocol_sketch.pdf","MimeType":"application/pdf"},{"ID":"2c5ffaaa-fbfe-4b7e-c90c-08de754d5847","FullName":"Updated_protocol_sketch.pdf (2).pdf","MimeType":"application/pdf"}]},"453d4313-5cab-4f0d-b447-d26cffe72717":{"files":[{"ID":"5b9efea5-a82f-42fa-3564-08de754e2ecf","FullName":"prince - JPEG.jpeg","MimeType":"image/jpeg"},{"ID":"24d24699-c158-47dc-3563-08de754e2ecf","FullName":"Eva by Haim Sutin.jpg","MimeType":"image/jpeg"}]}}' --output-file 453d-output.jsonResult:
